import 'package:flutter/widgets.dart';

class KeepAliveWrapper extends StatefulWidget {
  Widget child;
  bool wantKeepAlive;
  KeepAliveWrapper({super.key, required this.child, this.wantKeepAlive = true});

  @override
  State<KeepAliveWrapper> createState() => _KeepAliveWrapperState();
}

class _KeepAliveWrapperState extends State<KeepAliveWrapper>
    with AutomaticKeepAliveClientMixin {
  @override
  Widget build(BuildContext context) {
    return widget.child;
  }

  @override
  bool get wantKeepAlive => widget.wantKeepAlive;
}
